package com.wuzao.DecoratorPattern.application;

import com.wuzao.DecoratorPattern.base.Beverage;
import com.wuzao.DecoratorPattern.base.CondimentDecorator;

public class Whip extends CondimentDecorator {
    Beverage beverage;

    public Whip(Beverage beverage){
        this.beverage = beverage;
    }
    @Override
    public double cost() {
        return 0.30+beverage.cost();
    }

    @Override
    public String getDescription() {
        return beverage.getDescription()+",Whip";
    }
}
